---
title: "Baseline Tabulation"
author: "MAD"
date: "`r Sys.Date()`"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

```{r, echo=FALSE, results='asis'}
library(arsenal)
baseline <- readRDS(file = "baseline.Rds")
summary(tableby(arm.factor ~ refill_3mths + refill_12mths + male_hof_relation.factor + age_male_hof + mobile_owner.factor + decision_role.factor + decision_maker_main.factor + stove_repayment_period.factor + subsidy_time.factor + refill_frequency + refill_time.factor + refill_cost + religion.factor + community.factor + bpl_apl.factor + special_assistance.factor + free_rice_pds + number_people_stated + nuclear_joint.factor + participant_presence.factor + participant_marital.factor + participant_occupation.factor + participant_earnings + participant_cooking.factor + individual1_presence.factor + individual1_gender.factor + individual1_age + individual1_relationship.factor + individual1_marital.factor + individual1_occupation.factor + individual1_earnings + individual1_cooking.factor + stove_most_used.factor + lpg_cook.factor + lpg_number.factor + lpg_location.factor + lpg_ventilation.factor + lpg_burners.factor + lpg_time_owned + lpg_frequency.factor + lpg_past_week.factor + lpg_why_unused.factor + lpg_longevity + wood_present.factor + wood_frequency.factor + wood_purchase_collect.factor + wood_monthly_cost + wood_time_collect + wood_who_obtains___1.factor + wood_who_obtains___2.factor + wood_who_obtains___3.factor + wood_who_obtains___4.factor + lpg_present.factor + lpg_who_obtains___1.factor + lpg_who_obtains___2.factor + lpg_who_obtains___3.factor + lpg_who_obtains___4.factor + participant_price.factor + participant_availability.factor + participant_ease_of_use.factor + participant_smoke.factor + participant_taste.factor + household_price.factor + household_availability.factor + household_ease_of_use.factor + household_smoke.factor + household_taste.factor + rice_stove.factor + water_stove.factor + fodder_stove.factor + village_duration + house_duration + house_owns_rents.factor + house_maintenance + house_rent + ag_land.factor + ag_land_owned + rooms_total + rooms_cook + rooms_sleep_live + rooms_storage_livestock + roof_material.factor + walls_material.factor + floor_material.factor + water_source.factor + water_purification.factor + sanitation_facility.factor + electricity.factor + electricity_bill + livestock.factor + cows + food_expenses + household_income + ag_machine + irrigation_pumps + passenger_vehicle + pressure_cooker + mattress + table + mobile_phone + landline_phone.factor + refrigerator.factor + air_conditioner.factor + color_television.factor + washing_machine.factor + sewing_machine.factor + status_step.factor + household_id_village + sums.factor,  data=baseline, control=tableby.control(numeric.stats = c("N", "Nmiss2","meansd", "range"), cat.stats = c("N", "Nmiss2", "countpct"))))

```


